package com.tbit.uqbike.webmanager.controller;

import com.tbit.uqbike.object.pojo.vo.UsageMessageVO;
import com.tbit.common.entity.view.Result;
import com.tbit.uqbike.service.business.UsageRemindService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 用量提醒
 * @author <a href="mailto:liu.haoxiang@tbit.com.cn">BUGXiang</a>
 * @version 1.0
 * @since 2024-10-18
 */
@RestController
@RequestMapping("/usageRemind")
public class UsageRemindController {

    @Resource
    private UsageRemindService usageRemindService;


    /**
     * 获取品牌对应快到期服务
     * @param brandId 品牌id
     * @return Result
     */
    @GetMapping("/getMessage")
    public Result<UsageMessageVO> getMessage(Integer brandId) {
        if (brandId == null) {
            return Result.error("品牌id不能为空");
        }
        return usageRemindService.getMessage(brandId);
    }

}
